<template>
    <n-carousel show-arrow class="mb-6">
        <img v-for="(item, index) in data" :key="index" class="carousel-img rounded cursor-pointer"
            @click="$commonOpen(item)" :src="item.src" />
    </n-carousel>
</template>


<script setup>
// 引入 naive-ui 组件
import { NCarousel } from 'naive-ui'

// 声明类型
const props = defineProps({
    data: {
        type: Array,
        required: true
    }
});
</script>


<style scoped>
.carousel-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
</style>